    $(document).ready(function() {
        Judgeidentity()
        loadTableData()
    })

    //加载表格数据

    function loadTableData() {

        var data = [{
            "address": '平治东苑3栋二单元27楼',
            "person": '张小东',
            "phone": '18956478562',
            "time": '2019-09-12 12:00:11',
            "duration": '5小时',
            "status": '正常',
            "property": '紫东物业',
            "propertyphone": '15699846658'
        }, {
            "address": '燕歌园(东区)1栋一单元33层',
            "person": '张小东',
            "phone": '18956478562',
            "time": '2019-07-11 12:00:11',
            "duration": '4小时',
            "status": '正常',
            "property": '紫东物业',
            "propertyphone": '15699846658'
        }, {
            "address": '齐修南苑3栋二单元27层',
            "person": '张小东',
            "phone": '18956478562',
            "time": '2019-10-11 12:00:11',
            "duration": '3小时',
            "status": '正常',
            "property": '紫东物业',
            "propertyphone": '15699846658'
        }, {
            "address": '齐修南苑3栋二单元27层',
            "person": '张小东',
            "phone": '18956478562',
            "time": '2019-08-11 12:00:11',
            "duration": '3小时',
            "status": '正常',
            "property": '紫东物业',
            "propertyphone": '15699846658'
        }, {
            "address": '齐修南苑3栋二单元27层',
            "person": '张小东',
            "phone": '18956478562',
            "time": '2019-09-1 12:00:11',
            "duration": '6小时',
            "status": '正常',
            "property": '紫东物业',
            "propertyphone": '15699846658'
        }, {
            "address": '齐修南苑8栋1单元2层',
            "person": '张小东',
            "phone": '18956478562',
            "time": '2019-09-14 12:00:11',
            "duration": '6小时',
            "status": '正常',
            "property": '紫东物业',
            "propertyphone": '15699846658'
        }]

        layui.use('table', function() {
            var table = layui.table;

            //第一个实例
            table.render({
                title: '',
                text: {
                    none: '暂无数据'
                },
                elem: '#body-content-table',
                skin: 'nob',
                data: data,
                page: { limit: 13, } //开启分页
                ,
                cols: [
                    [ //表头
                        { field: 'address', title: '安装地址/维保单位', align: 'center' },
                        { field: 'person', title: '维保负责人', width: 150, align: 'center', },
                        { field: 'phone', title: '联系方式', align: 'center' },
                        { field: 'time', title: '最新维保时间', align: 'center' },
                        { field: 'duration', title: '最近维保耗时', align: 'center' },
                        { field: 'status', title: '维保状态', align: 'center' },
                        { field: 'property', title: '物业名称', align: 'center' },
                        { field: 'propertyphone', title: '物业联系方式', align: 'center' },
                        {
                            title: '操作',
                            align: 'center',
                            width: 160,
                            templet: function(d) {
                                let res = JSON.stringify(d);
                                return `<div><div class="table-tool">
                                    <div onclick='ignoreEvent(${res})'><img src="../static/img/edit.png">编辑</div>
                                    <div onclick='assignTo(${res})'><img src="../static/img/detail.png">详情</div>
                                    <div onclick='showDangerDetail(${res})'><img src="../static/img/delete.png">删除</div>
                                  </div></div>`

                            },
                        },
                    ]
                ]
            });

        });
    }